***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
*** This Program already converted to Y2K                                                                                                                                                                                                                 
*** S&T Departement     on 29 April 1999 by Ben.Rahman                                                                                                                                                                                                    
***                                                                                                                                                                                                                                                       
***                                                                                                                                                                                                                                                       
set cent on                                                                                                                                                                                                                                               
*  FILE NAME: RDOCDAT.PRG                                                                                                                                                                                                                                 
*  BY: NURJADI PURNAMA                                                                                                                                                                                                                                    
*  DATE: March 25, 1996                                                                                                                                                                                                                                   
*  DESC:                                                                                                                                                                                                                                                  
*  CALLED BY:                                                                                                                                                                                                                                             
*  DATA FILES:                                                                                                                                                                                                                                            
DR1='N:'                                                                                                                                                                                                                                                  
DR2='Q:'                                                                                                                                                                                                                                                  
F1='DOCTORS'                                                                                                                                                                                                                                              
F2='DOCT_FE1'                                                                                                                                                                                                                                             
set exact off                                                                                                                                                                                                                                             
SELE 1                                                                                                                                                                                                                                                    
SET EXCLU OFF                                                                                                                                                                                                                                             
USE &DR1&F1                                                                                                                                                                                                                                               
SELE 2                                                                                                                                                                                                                                                    
SET EXCLU OFF                                                                                                                                                                                                                                             
USE &DR1&F2 INDEX &DR1&F2                                                                                                                                                                                                                                 
GO TOP                                                                                                                                                                                                                                                    
MON=CMONTH(DATE_VISIT)                                                                                                                                                                                                                                    
store 0 to pl1,pl2,pl3,TOTFEE,TOTGROSS,TOTAX,TOTGROSSI,TOTAXI,totnet,totneti,PAG,fl,hl,ttl,ttl1                                                                                                                                                           
STORE SPACE(16) TO NMDOCT                                                                                                                                                                                                                                 
GO TOP                                                                                                                                                                                                                                                    
AWDOC=DOC_ALIAS                                                                                                                                                                                                                                           
GO BOTT                                                                                                                                                                                                                                                   
AKDOC=DOC_ALIAS                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                          
@08,03 CLEA TO 22,78                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
@ 12,53 SAY "DOCTOR'S NAME"                                                                                                                                                                                                                               
@ 14,42 SAY "FROM DOCTOR'S NAME : "+'['+AWDOC+']'                                                                                                                                                                                                         
@ 15,42 SAY "TO   DOCTOR'S NAME : "+'['+AKDOC+']'                                                                                                                                                                                                         
SELE 1                                                                                                                                                                                                                                                    
LY=SAVESCREEN(0,0,24,79)                                                                                                                                                                                                                                  
DO DOCBOX                                                                                                                                                                                                                                                 
IF LASTKEY()=27 .OR. NMDOCT=SPACE(16)                                                                                                                                                                                                                     
   RETURN                                                                                                                                                                                                                                                 
ENDIF                                                                                                                                                                                                                                                     
SET COLO TO BG+/B,W+/N                                                                                                                                                                                                                                    
AWDOC=NMDOCT                                                                                                                                                                                                                                              
RESTSCREEN(0,0,24,79,LY)                                                                                                                                                                                                                                  
@ 14,64 SAY AWDOC PICT '@!'                                                                                                                                                                                                                               
LY=SAVESCREEN(0,0,24,79)                                                                                                                                                                                                                                  
DO DOCBOX2                                                                                                                                                                                                                                                
IF LASTKEY()=27 .OR. NMDOCT=SPACE(16)                                                                                                                                                                                                                     
   RETURN                                                                                                                                                                                                                                                 
ENDIF                                                                                                                                                                                                                                                     
SET COLO TO BG+/B,W+/N                                                                                                                                                                                                                                    
AKDOC=NMDOCT                                                                                                                                                                                                                                              
RESTSCREEN(0,0,24,79,LY)                                                                                                                                                                                                                                  
@ 15,64 SAY AKDOC PICT '@!'                                                                                                                                                                                                                               
BTGLTRA=DATE()                                                                                                                                                                                                                                            
ETGLTRA=DATE()                                                                                                                                                                                                                                            
@ 17,47 SAY 'FROM DATE : '+'['+DTOC(BTGLTRA)+']'                                                                                                                                                                                                          
@ 18,47 SAY 'TO   DATE : '+'['+DTOC(ETGLTRA)+']'                                                                                                                                                                                                          
DO WHILE .T.                                                                                                                                                                                                                                              
   @ 17,60 GET BTGLTRA PICT '99/99/9999'                                                                                                                                                                                                                  
   READ                                                                                                                                                                                                                                                   
   IF LASTKEY()=27                                                                                                                                                                                                                                        
      RETURN                                                                                                                                                                                                                                              
   ENDIF                                                                                                                                                                                                                                                  
   if BTGLTRA>=date()                                                                                                                                                                                                                                     
      loop                                                                                                                                                                                                                                                
   endif                                                                                                                                                                                                                                                  
   exit                                                                                                                                                                                                                                                   
enddo                                                                                                                                                                                                                                                     
DO WHILE .T.                                                                                                                                                                                                                                              
   @ 18,60 GET ETGLTRA PICT '99/99/9999'                                                                                                                                                                                                                  
   READ                                                                                                                                                                                                                                                   
   IF LASTKEY()=27                                                                                                                                                                                                                                        
      RETURN                                                                                                                                                                                                                                              
   ENDIF                                                                                                                                                                                                                                                  
   if ETGLTRA>=date() .OR. ETGLTRA<BTGLTRA .OR. MONTH(BTGLTRA)<>MONTH(ETGLTRA)                                                                                                                                                                            
      loop                                                                                                                                                                                                                                                
   endif                                                                                                                                                                                                                                                  
   exit                                                                                                                                                                                                                                                   
enddo                                                                                                                                                                                                                                                     
PIL4=1                                                                                                                                                                                                                                                    
DO BOX2 WITH 21,42,"DO YOU WANT TO : ","PRINT","CANCEL",'GR+','RB','GR+','R',PIL4,.F.,.T.                                                                                                                                                                 
IF PIL4=2                                                                                                                                                                                                                                                 
   RETURN                                                                                                                                                                                                                                                 
ENDIF                                                                                                                                                                                                                                                     
tanggal=date()                                                                                                                                                                                                                                            
DOCCOD=SPACE(3)                                                                                                                                                                                                                                           
DOCNAM=SPACE(12)                                                                                                                                                                                                                                          
br=100                                                                                                                                                                                                                                                    
totgrossi=0                                                                                                                                                                                                                                               
totaxi=0                                                                                                                                                                                                                                                  
totneti=0                                                                                                                                                                                                                                                 
ttl=0                                                                                                                                                                                                                                                     
ttl1=0                                                                                                                                                                                                                                                    
PROC=0                                                                                                                                                                                                                                                    
HL=0                                                                                                                                                                                                                                                      
set devi to print                                                                                                                                                                                                                                         
@ 0,0 say chr(15) pict 'x'                                                                                                                                                                                                                                
SELE 2                                                                                                                                                                                                                                                    
SEEK AWDOC                                                                                                                                                                                                                                                
DO WHILE DOC_ALIAS>=AWDOC .AND. DOC_ALIAS<=AKDOC .AND. .NOT. EOF()                                                                                                                                                                                        
   AWDOC=DOC_ALIAS                                                                                                                                                                                                                                        
   PAG=0                                                                                                                                                                                                                                                  
   HL=0                                                                                                                                                                                                                                                   
   PROC=0                                                                                                                                                                                                                                                 
   BR=100                                                                                                                                                                                                                                                 
   SEEK AWDOC                                                                                                                                                                                                                                             
   ? AWDOC,DOC_ALIAS,BR                                                                                                                                                                                                                                   
   WAIT ''                                                                                                                                                                                                                                                
   DO WHILE DOC_ALIAS=AWDOC .AND. .NOT. EOF()                                                                                                                                                                                                             
      IF DATE_VISIT<BTGLTRA .OR. DATE_VISIT>ETGLTRA                                                                                                                                                                                                       
         SKIP                                                                                                                                                                                                                                             
         LOOP                                                                                                                                                                                                                                             
      ENDIF                                                                                                                                                                                                                                               
      DOCCOD=DOC_CODE                                                                                                                                                                                                                                     
      DOCNAM=DOC_ALIAS                                                                                                                                                                                                                                    
      DOCW=LEN(TRIM(DOCNAM))                                                                                                                                                                                                                              
      SELE 1                                                                                                                                                                                                                                              
      LOCAT FOR DOC_CODE=DOCCOD                                                                                                                                                                                                                           
      IF FOUND()                                                                                                                                                                                                                                          
         pract=practice_1                                                                                                                                                                                                                                 
      ENDIF                                                                                                                                                                                                                                               
      SELE 2                                                                                                                                                                                                                                              
      IF BR>56                                                                                                                                                                                                                                            
         IF HL=0                                                                                                                                                                                                                                          
            HL=1                                                                                                                                                                                                                                          
         ELSE                                                                                                                                                                                                                                             
            br=br+2                                                                                                                                                                                                                                       
            @ BR,  2 SAY "Total, this page"                                                                                                                                                                                                               
            @ br, 19 say repl(chr(46),110)                                                                                                                                                                                                                
            DO SAYG WITH BR,130,TTL1,'99,999.99','9,999,999'                                                                                                                                                                                              
*            @ br,130 say ttl1 pict "9,999,999"                                                                                                                                                                                                           
            br=br+1                                                                                                                                                                                                                                       
            @ BR,  2 SAY "Total to be carried forward"                                                                                                                                                                                                    
            @ br, 30 say repl(chr(46),99)                                                                                                                                                                                                                 
            DO SAYG WITH BR,129,TTL,'999,999.99','99,999,999'                                                                                                                                                                                             
*            @ br,129 say ttl pict "99,999,999"                                                                                                                                                                                                           
*            EJECT                                                                                                                                                                                                                                        
         ENDIF                                                                                                                                                                                                                                            
         cl=50                                                                                                                                                                                                                                            
         hl=hl+1                                                                                                                                                                                                                                          
         ppag=pag                                                                                                                                                                                                                                         
         PAG=PAG+1                                                                                                                                                                                                                                        
         @  1, 44 SAY CHR(27)+'G'                                                                                                                                                                                                                         
         @  1, 44 say 'S. O. S.  M E D I K A'                                                                                                                                                                                                             
         @  1, 44 SAY CHR(27)+'H'                                                                                                                                                                                                                         
         if pag=1                                                                                                                                                                                                                                         
            @  3, 26 SAY 'Schedule of fees of'                                                                                                                                                                                                            
            if pract="DENTIST"                                                                                                                                                                                                                            
               NPOS=DOCW+54                                                                                                                                                                                                                               
               @ 3, 46 SAY "Drg. "+DOCNAM                                                                                                                                                                                                                 
            ELSE                                                                                                                                                                                                                                          
               NPOS=DOCW+53                                                                                                                                                                                                                               
               @ 3, 46 SAY "Dr. "+DOCNAM                                                                                                                                                                                                                  
            ENDIF                                                                                                                                                                                                                                         
            @  3, NPOS SAY "for the month of "+MON                                                                                                                                                                                                        
            @  5,  4 say "Page "+STR(PAG)                                                                                                                                                                                                                 
            @  5, 64 say "issued on "+dtoc(date())                                                                                                                                                                                                        
            BR=8                                                                                                                                                                                                                                          
         else                                                                                                                                                                                                                                             
            @  3, 6 SAY 'Schedule of fees of'                                                                                                                                                                                                             
            docw=0                                                                                                                                                                                                                                        
            if pract="DENTIST"                                                                                                                                                                                                                            
               docw=len(trim(docnam))+6+26                                                                                                                                                                                                                
               @ 3, 26 SAY "Drg. "+DOCNAM                                                                                                                                                                                                                 
            ELSE                                                                                                                                                                                                                                          
               docw=len(trim(docnam))+5+26                                                                                                                                                                                                                
               @ 3, 26 SAY "Dr. "+DOCNAM                                                                                                                                                                                                                  
            ENDIF                                                                                                                                                                                                                                         
            @  3,docw SAY "for the month of "+MON                                                                                                                                                                                                         
            cmt=docw+len(MON)+24                                                                                                                                                                                                                          
            @ 3, cmt say "Continued from page "+ltrim(str(PPAG))                                                                                                                                                                                          
            @ 5,  4 say "Page "+ltrim(STR(PAG))                                                                                                                                                                                                           
            @ 5, 64 say "issued on "+dtoc(date())                                                                                                                                                                                                         
         endif                                                                                                                                                                                                                                            
         br=8                                                                                                                                                                                                                                             
         @ br,  4 say "INV."                                                                                                                                                                                                                              
         @ br, 12 say "DATE OF"                                                                                                                                                                                                                           
         @ br, 30 say "P A T I E N T"                                                                                                                                                                                                                     
         @ br, 59 say "P R O C E D U R E"                                                                                                                                                                                                                 
         @ BR, 89 SAY "NBER"                                                                                                                                                                                                                              
         @ br, 96 say "UNIT"                                                                                                                                                                                                                              
         @ BR,106 SAY "TOTAL"                                                                                                                                                                                                                             
         @ br,117 say "GROSS"                                                                                                                                                                                                                             
         @ BR,127 SAY "TAX"                                                                                                                                                                                                                               
         @ BR,133 SAY "NET"                                                                                                                                                                                                                               
         BR=BR+1                                                                                                                                                                                                                                          
         @ BR,  4 SAY "Nber."                                                                                                                                                                                                                             
         @ BR, 12 SAY "VISIT"                                                                                                                                                                                                                             
         @ BR, 22 SAY "CODE"                                                                                                                                                                                                                              
         @ BR, 28 SAY "NAME & FIRST NAME"                                                                                                                                                                                                                 
         @ BR, 59 SAY "CODE"                                                                                                                                                                                                                              
         @ BR, 65 SAY "DESCRIPTION"                                                                                                                                                                                                                       
         @ BR, 96 SAY "PRICE"                                                                                                                                                                                                                             
         @ BR,106 SAY "PRICE"                                                                                                                                                                                                                             
         @ BR,118 SAY "FEE"                                                                                                                                                                                                                               
         @ BR,126 SAY "PPH 21"                                                                                                                                                                                                                            
         @ BR,133 SAY "FEE"                                                                                                                                                                                                                               
         IF PAG>1                                                                                                                                                                                                                                         
            BR=BR+2                                                                                                                                                                                                                                       
            ttl1=0                                                                                                                                                                                                                                        
            @ BR,  2 SAY "Carried forward from page"                                                                                                                                                                                                      
            @ BR, 28 say ppag  pict "99"                                                                                                                                                                                                                  
            @ br, 30 say repl(chr(46),99)                                                                                                                                                                                                                 
            DO SAYG WITH BR,129,TTL,'999,999.99','99,999,999'                                                                                                                                                                                             
*            @ BR,129 say ttl PICT "99,999,999"                                                                                                                                                                                                           
         ENDIF                                                                                                                                                                                                                                            
      ELSE                                                                                                                                                                                                                                                
         br=br+2                                                                                                                                                                                                                                          
         TOTPRIC=PUB_PRICE*PROC_X                                                                                                                                                                                                                         
         IF TOTPRIC=0                                                                                                                                                                                                                                     
            DO CASE                                                                                                                                                                                                                                       
            CASE AREA_CODE='G' .OR. AREA_CODE='E' .OR. AREA_CODE='P'                                                                                                                                                                                      
               TAX=DOC_FEE*(100/42.5)*0.06                                                                                                                                                                                                                
            CASE AREA_CODE='D'                                                                                                                                                                                                                            
               TAX=DOC_FEE*(100/50)*0.06                                                                                                                                                                                                                  
            CASE AREA_CODE='S' .OR. AREA_CODE='O' .OR. AREA_CODE='Y'                                                                                                                                                                                      
               TAX=DOC_FEE*(100/52)*0.06                                                                                                                                                                                                                  
            ENDCASE                                                                                                                                                                                                                                       
         ELSE                                                                                                                                                                                                                                             
            IF AREA_CODE='P' .OR. AREA_CODE='E'                                                                                                                                                                                                           
               TAX=DOC_FEE*0.15                                                                                                                                                                                                                           
            ELSE                                                                                                                                                                                                                                          
               IF DOC_FEE<TOTPRIC*0.4                                                                                                                                                                                                                     
                  TAX=DOC_FEE*0.15                                                                                                                                                                                                                        
               ELSE                                                                                                                                                                                                                                       
                  TAX=TOTPRIC*0.06                                                                                                                                                                                                                        
               ENDIF                                                                                                                                                                                                                                      
            ENDIF                                                                                                                                                                                                                                         
         ENDIF                                                                                                                                                                                                                                            
         if doc_fee>0                                                                                                                                                                                                                                     
            NET=DOC_FEE-TAX                                                                                                                                                                                                                               
         else                                                                                                                                                                                                                                             
            tax=0                                                                                                                                                                                                                                         
            net=0                                                                                                                                                                                                                                         
         endif                                                                                                                                                                                                                                            
         PROC=PROC+1                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                          
         IF AREA_CODE='G' .AND. SUB_AREACO='3'                                                                                                                                                                                                            
            @ BR,  0 SAY CHR(27)+'G'+TRANS(PROC,'##9')+CHR(27)+'H'                                                                                                                                                                                        
            @ BR,  4 SAY CHR(27)+'G'+INV_NBER+CHR(27)+'H'                                                                                                                                                                                                 
            @ BR, 12 SAY CHR(27)+'G'+DTOC(DATE_VISIT)+CHR(27)+'H'                                                                                                                                                                                         
            @ BR, 22 SAY CHR(27)+'G'+PAT_FILCOD+CHR(27)+'H'                                                                                                                                                                                               
            cPatnam = ALLTRIM(PAT_NAME)+' '+ALLTRIM(PAT_F_NAME)                                                                                                                                                                                           
            @ BR, 30 SAY CHR(27)+'G'+cPatnam+CHR(27)+'H'                                                                                                                                                                                                  
            @ BR, 63 SAY CHR(27)+'G'+AREA_CODE+sub_areaco+pro_code+CHR(27)+'H'                                                                                                                                                                            
            @ BR, 65 SAY CHR(27)+'G'+SHRT_DESCR+CHR(27)+'H'                                                                                                                                                                                               
            @ BR, 89 SAY CHR(27)+'G'+TRANS(PROC_X,'#9')+CHR(27)+'H'                                                                                                                                                                                       
            if area_code='P' .or. area_code='E'                                                                                                                                                                                                           
               @ br, 95 say CHR(27)+'G'+'N / A'+CHR(27)+'H'                                                                                                                                                                                               
               @ br,105 say CHR(27)+'G'+'N / A'+CHR(27)+'H'                                                                                                                                                                                               
            else                                                                                                                                                                                                                                          
                IF AEADECI                                                                                                                                                                                                                                
                   @ BR, 93 SAY CHR(27)+'G'+TRANS(PUB_PRICE,'#,###,##9.99')+CHR(27)+'H'                                                                                                                                                                   
                   @ BR,103 SAY CHR(27)+'G'+TRANS(TOTPRIC,'#,###,##9.99')+CHR(27)+'H'                                                                                                                                                                     
                ELSE                                                                                                                                                                                                                                      
                   @ BR, 93 SAY CHR(27)+'G'+TRANS(PUB_PRICE,'#,###,##9')+CHR(27)+'H'                                                                                                                                                                      
                   @ BR,103 SAY CHR(27)+'G'+TRANS(TOTPRIC,'#,###,##9')+CHR(27)+'H'                                                                                                                                                                        
                ENDIF                                                                                                                                                                                                                                     
            ENDIF                                                                                                                                                                                                                                         
            IF AEADECI                                                                                                                                                                                                                                    
               @ BR,113 SAY CHR(27)+'G'+TRANS(DOC_FEE,'#,###,##9.99')+CHR(27)+'H'                                                                                                                                                                         
               @ BR,123 SAY CHR(27)+'G'+TRANS(TAX,'##,##9.99')+CHR(27)+'H'                                                                                                                                                                                
               @ BR,130 SAY CHR(27)+'G'+TRANS(NET,'#,###,##9.99')+CHR(27)+'H'                                                                                                                                                                             
            ELSE                                                                                                                                                                                                                                          
               @ BR,113 SAY CHR(27)+'G'+TRANS(DOC_FEE,'#,###,##9')+CHR(27)+'H'                                                                                                                                                                            
               @ BR,123 SAY CHR(27)+'G'+TRANS(TAX,'##,##9')+CHR(27)+'H'                                                                                                                                                                                   
               @ BR,130 SAY CHR(27)+'G'+TRANS(NET,'#,###,##9')+CHR(27)+'H'                                                                                                                                                                                
            ENDIF                                                                                                                                                                                                                                         
         ELSE                                                                                                                                                                                                                                             
            @ BR,  0 SAY PROC         PICT "999"                                                                                                                                                                                                          
            @ BR,  4 SAY INV_NBER                                                                                                                                                                                                                         
            @ BR, 12 SAY DTOC(DATE_VISIT)                                                                                                                                                                                                                 
            @ BR, 22 SAY PAT_FILCOD                                                                                                                                                                                                                       
            @ BR, 30 SAY TRIM(PAT_NAME)+' '+PAT_F_NAME                                                                                                                                                                                                    
            @ BR, 59 SAY AREA_CODE+SUB_AREACO+PRO_CODE                                                                                                                                                                                                    
            @ BR, 65 SAY SHRT_DESCR                                                                                                                                                                                                                       
            @ BR, 89 SAY PROC_X      pict "99"                                                                                                                                                                                                            
            if area_code='P' .or. area_code='E'                                                                                                                                                                                                           
               @ br, 95 say "N / A"                                                                                                                                                                                                                       
               @ br,105 say "N / A"                                                                                                                                                                                                                       
            else                                                                                                                                                                                                                                          
               DO SAYG WITH BR,93,PUB_PRICE,'99,999.99','9,999,999'                                                                                                                                                                                       
               DO SAYG WITH BR,103,TOTPRIC,'99,999.99','9,999,999'                                                                                                                                                                                        
*               @ BR, 93 SAY PUB_PRICE   pict "9,999,999"                                                                                                                                                                                                 
*               @ BR,103 SAY TOTPRIC     pict "9,999,999"                                                                                                                                                                                                 
            ENDIF                                                                                                                                                                                                                                         
            DO SAYG WITH BR,113,DOC_FEE,'99,999.99','9,999,999'                                                                                                                                                                                           
            DO SAYG WITH BR,123,TAX,'9,999.99','99,999'                                                                                                                                                                                                   
            DO SAYG WITH BR,130,NET,'99,999.99','9,999,999'                                                                                                                                                                                               
*            @ BR,113 SAY DOC_FEE     pict "9,999,999"                                                                                                                                                                                                    
*            @ BR,123 SAY TAX         pict "99,999"                                                                                                                                                                                                       
*            @ BR,130 SAY NET         pict "9,999,999"                                                                                                                                                                                                    
         ENDI                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
         TTL=TTL+NET                                                                                                                                                                                                                                      
         TTL1=TTL1+NET                                                                                                                                                                                                                                    
         TOTGROSS=TOTGROSS+DOC_FEE                                                                                                                                                                                                                        
         TOTAX=TOTAX+TAX                                                                                                                                                                                                                                  
         TOTGROSSI=TOTGROSSI+DOC_FEE                                                                                                                                                                                                                      
         TOTAXI=TOTAXI+TAX                                                                                                                                                                                                                                
         TOTNET=TOTNET+NET                                                                                                                                                                                                                                
         TOTNETI=TOTNETI+NET                                                                                                                                                                                                                              
      endif                                                                                                                                                                                                                                               
      skip                                                                                                                                                                                                                                                
   ENDDO                                                                                                                                                                                                                                                  
   ? BR                                                                                                                                                                                                                                                   
   WAIT ''                                                                                                                                                                                                                                                
   br=br+2                                                                                                                                                                                                                                                
   if br<56                                                                                                                                                                                                                                               
      @ BR,  2 SAY "Total, this page"                                                                                                                                                                                                                     
      @ br, 19 say repl(chr(46),110)                                                                                                                                                                                                                      
      DO SAYG WITH BR,130,TTL1,'99,999.99','9,999,999'                                                                                                                                                                                                    
*      @ br,130 say ttl1 pict "9,999,999"                                                                                                                                                                                                                 
      br=br+2                                                                                                                                                                                                                                             
      @ BR,  2 SAY "Grand Total"                                                                                                                                                                                                                          
      @ br, 14 say repl(chr(46),115)                                                                                                                                                                                                                      
      DO SAYG WITH BR,129,TTL,'999,999.99','99,999,999'                                                                                                                                                                                                   
*      @ br,129 say ttl pict "99,999,999"                                                                                                                                                                                                                 
      br=br+2                                                                                                                                                                                                                                             
   else                                                                                                                                                                                                                                                   
      IF BR>100                                                                                                                                                                                                                                           
         BR=100                                                                                                                                                                                                                                           
         LOOP                                                                                                                                                                                                                                             
      ENDIF                                                                                                                                                                                                                                               
      @ BR,  2 SAY "Total, this page"                                                                                                                                                                                                                     
      @ br, 19 say repl(chr(46),110)                                                                                                                                                                                                                      
      DO SAYG WITH BR,130,TTL1,'99,999.99','9,999,999'                                                                                                                                                                                                    
*      @ br,130 say ttl1 pict "9,999,999"                                                                                                                                                                                                                 
      br=br+2                                                                                                                                                                                                                                             
      @ BR,  2 SAY "Grand Total"                                                                                                                                                                                                                          
      @ br, 14 say repl(chr(46),115)                                                                                                                                                                                                                      
      DO SAYG WITH BR,129,TTL,'999,999.99','99,999,999'                                                                                                                                                                                                   
*      @ br,129 say ttl pict "99,999,999"                                                                                                                                                                                                                 
      br=br+2                                                                                                                                                                                                                                             
      br=0                                                                                                                                                                                                                                                
      @  1, 44 SAY CHR(27)+'G'                                                                                                                                                                                                                            
      @  1, 44 say 'S. O. S.  M E D I K A'                                                                                                                                                                                                                
      @  1, 44 SAY CHR(27)+'H'                                                                                                                                                                                                                            
      @  3, 6 SAY 'Schedule of fees of'                                                                                                                                                                                                                   
      docw=0                                                                                                                                                                                                                                              
      if pract="DENTIST"                                                                                                                                                                                                                                  
         docw=len(trim(docnam))+6+26                                                                                                                                                                                                                      
         @ 3, 26 SAY "Drg. "+DOCNAM                                                                                                                                                                                                                       
      ELSE                                                                                                                                                                                                                                                
         docw=len(trim(docnam))+5+26                                                                                                                                                                                                                      
         @ 3, 26 SAY "Dr. "+DOCNAM                                                                                                                                                                                                                        
      ENDIF                                                                                                                                                                                                                                               
      @  3,docw SAY "for the month of "+MON                                                                                                                                                                                                               
      cmt=docw+len(MON)+24                                                                                                                                                                                                                                
      @ 3, cmt say "Continued from page "+ltrim(STR(PPAG))                                                                                                                                                                                                
      @ 5,  4 say "Page "+ltrim(STR(PAG))                                                                                                                                                                                                                 
      @ 5, 64 say "issued on "+dtoc(date())                                                                                                                                                                                                               
      @ 7,  2 SAY "Carried forward from page "                                                                                                                                                                                                            
      @ 7, 30 say ppag                                                                                                                                                                                                                                    
      DO SAYG WITH 7,129,TTL,'999,999.99','99,999,999'                                                                                                                                                                                                    
*      @ 7,129 say ttl pict "99,999,999"                                                                                                                                                                                                                  
      br=10                                                                                                                                                                                                                                               
   endif                                                                                                                                                                                                                                                  
   @ br, 12 say "TOTAL PAYABLE TO"                                                                                                                                                                                                                        
   IF PRACT='DENTIST'                                                                                                                                                                                                                                     
      @ BR, 29 SAY "Drg. "+DOCNAM                                                                                                                                                                                                                         
   ELSE                                                                                                                                                                                                                                                   
      @ BR, 29 SAY "Dr. "+DOCNAM                                                                                                                                                                                                                          
   ENDIF                                                                                                                                                                                                                                                  
   DO SAYG WITH BR,44,TTL,'999,999.99','99,999,999'                                                                                                                                                                                                       
*   @ BR, 44  SAY TTL PICT "99,999,999"                                                                                                                                                                                                                   
   @ BR, 55  SAY "Rupiah"                                                                                                                                                                                                                                 
   br=br+2                                                                                                                                                                                                                                                
   @ BR, 12 SAY "For information ==>> Gross :"                                                                                                                                                                                                            
   DO SAYG WITH BR,44,TOTGROSSI,'999,999.99','99,999,999'                                                                                                                                                                                                 
*   @ BR, 44 say totgrossi pict "99,999,999"                                                                                                                                                                                                              
   @ Br, 55 say "Rupiah, less Tax (PPH21) :"                                                                                                                                                                                                              
   DO SAYG WITH BR,82,TOTAXI,'99,999.99','9,999,999'                                                                                                                                                                                                      
*   @ br, 82 say totaxi pict "9,999,999"                                                                                                                                                                                                                  
   @ br, 92 say "Rupiah"                                                                                                                                                                                                                                  
   br=br+2                                                                                                                                                                                                                                                
   @ br, 12 say 'N.B. : This total excludes  "On-Duty" fees as well as fees for evacuation and special duties.'                                                                                                                                           
*   BR=100                                                                                                                                                                                                                                                
*   EJECT                                                                                                                                                                                                                                                 
ENDDO                                                                                                                                                                                                                                                     
EJECT                                                                                                                                                                                                                                                     
SET DEVI TO SCREEN                                                                                                                                                                                                                                        
CLOSE DATA                                                                                                                                                                                                                                                
CLOSE INDEX                                                                                                                                                                                                                                               
RETURN                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
*Formatted by: Herman T Ver. 7.1  on March 25, 1996.                                                                                                                                                                                                      
